import httpInstant from '../utils/http';


/**
 * @description 获取消息中心的评论列表
 * @param {number} userId 用户id
 * @param {number} userId 用户id
 * @param {number} userId 用户id
 * @returns
 */
export function getMessageCommentApi(userId, currentPage, pageSize) {
  return httpInstant.get('/message/getCommentList', {
    params: {
      userId,
      currentPage,
      pageSize
    }
  });
}

/**
 * @description 获取消息中心的点赞列表
 * @param userId 用户id
 * @param currentPage 当前页
 * @param pageSize 每页条数
 * @returns
 */
export function getMessageGoodApi(userId, currentPage, pageSize) {
  return httpInstant.get('/message/getGoodList', {
    params: {
      userId,
      currentPage,
      pageSize
    }
  });
}



/**
 * @description 获取消息中心的收藏列表
 * @param userId 用户id
 * @param currentPage 当前页
 * @param pageSize 每页条数
 * @returns
 */
export function getMessageCollectionApi(userId, currentPage, pageSize) {
  return httpInstant.get('/message/getCollectionList', {
    params: {
      userId,
      currentPage,
      pageSize
    }
  });
}


/**
 * @description 获取消息中心的关注列表
 * @param userId 用户id
 * @param currentPage 当前页
 * @param pageSize 每页条数
 * @returns
 */
export function getMessageAttentionApi(userId, currentPage, pageSize) {
  return httpInstant.get('/message/getAttentionList', {
    params: {
      userId,
      currentPage,
      pageSize
    }
  });
}


/**
 * @description 获取消息中心的粉丝列表
 * @param userId 用户id
 * @param currentPage 当前页
 * @param pageSize 每页条数
 * @returns
 */
export function getMessageFansApi(userId, currentPage, pageSize) {
  return httpInstant.get('/message/getFansList', {
    params: {
      userId,
      currentPage,
      pageSize
    }
  });
}


/**
 * @description 获取user的聊天列表
 * @param userId  用户id
 * @returns
 */
export function getMassageChatListApi(userId) {
  return httpInstant.get('/message/getChatList', {
    params: {
      userId
    }
  });
}


/**
 * @description 获取聊天消息列表
 * @param sendId  发送者id
 * @param receiveId 接收者id
 * @returns
 */
export function getChatMessageListApi(sendId, receiveId) {
  return httpInstant.get('/message/getMessageList', {
    params: {
      sendId,
      receiveId
    }
  });
}


/**
 * @description 发送消息
 * @param messageList 消息列表
 * @returns
 */
export function addMessageListApi(messageList) {
  return httpInstant.post('/message/addMessageList', messageList);
}


/**
 * @description 获得该用户的@列表
 * @param 当前页码
 * @param 页面大小
 * @param 用户id
 * @returns
 */
export function getAtListApi(userId, currentPage, pageSize) {
  return httpInstant.get(`/message/getAtList`, {
    params: {
      currentPage,
      pageSize,
      userId
    }
  });
}


export function getAdditionalCommentApi(userId, currentPage, pageSize) {
  return httpInstant.get('/message/getMessageAdditionalCommentList', {
    params: {
      userId,
      currentPage,
      pageSize
    }
  });
}